<#setting number_format="#">
<#macro buildFormItem p forUpdate>
    <#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat">
        <adminlte:form-datetime _name="${p.name}" _id="${p.name}${forUpdate?then('Update', 'Create')}" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="datetime ${p.name}"/><#elseif (p.type?ends_with('Integer') && p.column?starts_with('is'))>
        <adminlte:form-select _name="${p.name}" _id="${p.name}${forUpdate?then('Update', 'Create')}" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictLogical"/><#elseif (p.type?ends_with('Integer') && p.column == 'type')>
        <adminlte:form-select _name="${p.name}" _id="${p.name}${forUpdate?then('Update', 'Create')}" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictType"/><#elseif (p.type?ends_with('Integer') && p.column == 'status')>
        <adminlte:form-select _name="${p.name}" _id="${p.name}${forUpdate?then('Update', 'Create')}" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictStatus"/><#else>
        <adminlte:form-input _name="${p.name}" _id="${p.name}${forUpdate?then('Update', 'Create')}" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _type="text" _placeholder=""/></#if>
</#macro>
<#macro buildValidationRule p>
    ${p.name}: {<#if p.config.createOrUpdate.required>
        required: true,</#if><#if p.config.createOrUpdate.validation??><#if p.config.createOrUpdate.validation.length?? && p.config.createOrUpdate.validation.length.enabled><#if (p.config.createOrUpdate.validation.length.min > 0 && p.config.createOrUpdate.validation.length.max > 0)>
        rangelength: [${p.config.createOrUpdate.validation.length.min}, ${p.config.createOrUpdate.validation.length.max}],<#elseif (p.config.createOrUpdate.validation.length.eq > 0)>
        rangelength: [${p.config.createOrUpdate.validation.length.eq}, ${p.config.createOrUpdate.validation.length.eq}],<#elseif (p.config.createOrUpdate.validation.length.min > 0)>
        minlength: ${p.config.createOrUpdate.validation.length.min},<#elseif (p.config.createOrUpdate.validation.length.max > 0)>
        maxlength: ${p.config.createOrUpdate.validation.length.max},</#if></#if><#if p.config.createOrUpdate.validation.email?? && p.config.createOrUpdate.validation.email.enabled>
        email: true,</#if><#if p.config.createOrUpdate.validation.numeric?? && p.config.createOrUpdate.validation.numeric.enabled>
        number: true, <#if (p.config.createOrUpdate.validation.numeric.min > 0 && p.config.createOrUpdate.validation.numeric.max > 0)>
        range: [${p.config.createOrUpdate.validation.numeric.min}, ${p.config.createOrUpdate.validation.numeric.max}],<#elseif (p.config.createOrUpdate.validation.numeric.eq > 0)>
        range: [${p.config.createOrUpdate.validation.numeric.eq}, ${p.config.createOrUpdate.validation.numeric.eq}],<#elseif (p.config.createOrUpdate.validation.numeric.min > 0)>
        min: ${p.config.createOrUpdate.validation.numeric.min},<#elseif (p.config.createOrUpdate.validation.numeric.max > 0)>
        max: ${p.config.createOrUpdate.validation.numeric.max},</#if></#if></#if>
    },
</#macro>
<%--
  ${viewProps.filename}.jsp generated By CrudMojo on ${.now?string("yyyy/MM/dd a HH:mm")}
  Author: ${app.author!"YMP (https://www.ymate.net/)"}
  Version: ${app.version!"1.0.0"}
--%>
<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.ymate.net/ymweb_core" prefix="ymweb" %>
<%@ taglib uri="http://www.ymate.net/ymweb_fn" prefix="func" %>
<%@ taglib tagdir="/WEB-INF/tags/adminlte3" prefix="adminlte" %>

<ymweb:ui src="_base_crud">
    <ymweb:property name="page.title"><#if api.description?? && (api.description?length > 0)>${api.description}<#else>${api.name}</#if></ymweb:property>
    <#if (viewProps.pagePath?length > 0)><ymweb:property name="page.path">${viewProps.pagePath}</ymweb:property></#if>
    <ymweb:property name="page.scripts">
        <script type="text/javascript">
            $(function () {
                var _pagePath = '${viewProps.pagePath}';

                var _dict = {<#if hasLogical!false>
                    logical: {
                        '0': '否',
                        '1': '是'
                    },</#if><#if hasStatus!false>
                    status: {
                        '0': '正常',
                        '1': '禁用'
                    },</#if><#if hasType!false>
                    type: {
                        '0': '默认'
                    }</#if>
                };

                <#if hasLogical!false>$('.select2.dictLogical').select2({
                    placeholder: '请选择',
                    allowClear: true,
                    multiple: false,
                    language: 'zh-CN',
                    data: [
                        {id: '', text: '', selected: true},
                        {id: '0', text: '否'},
                        {id: '1', text: '是'},
                    ]
                });

                </#if><#if hasStatus!false>$('.select2.dictStatus').select2({
                    placeholder: '请选择',
                    allowClear: true,
                    multiple: false,
                    language: 'zh-CN',
                    data: [
                        {id: '', text: '', selected: true},
                        {id: '0', text: '正常'},
                        {id: '1', text: '禁用'},
                    ]
                });

                </#if><#if hasType!false>$('.select2.dictType').select2({
                    placeholder: '请选择',
                    allowClear: true,
                    multiple: false,
                    language: 'zh-CN',
                    data: [
                        {id: '', text: '', selected: true},
                        {id: '0', text: '默认'},
                    ]
                });</#if>

                <#if !(api.settings??) || api.settings.enableCreate!true || api.settings.enableUpdate!true>var _validationRules = {
                    <#if multiPrimaryKey><#list primaryFields as p><@buildValidationRule p/></#list><#elseif primaryKey?? && primaryKey.config?? && primaryKey.config.createOrUpdate?? && primaryKey.config.createOrUpdate.enabled><@buildValidationRule primaryKey/></#if>
                    <#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled><@buildValidationRule p/></#if></#list>
                };</#if>

                <#list api.properties as p><#if p.config?? && p.config.query?? && p.config.query.enabled><#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat">
                $('.datetimepicker.${p.name}').dateRangeWrapper();

                </#if></#if></#list>
                <#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled><#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat">
                $('.datetime.${p.name}').datetimepicker({
                    format: 'YYYY-MM-DD',
                    locale: 'zh-cn',
                });

                </#if></#if></#list>
                <#if !(api.settings??) || api.settings.enableRemove!true>function _doDelete(tableWrapper, paginator, <#if multiPrimaryKey><#list primaryFields as p>${p.name}<#if p_has_next>, </#if></#list><#else>ids</#if>) {
                    if (<#if multiPrimaryKey><#list primaryFields as p>${p.name}<#if p_has_next> && </#if></#list><#else>ids && ids.length > 0</#if>) {
                        __confirmShow({
                            content: '确认要删除所选记录吗？该操作将不可恢复！',
                            ok: function () {
                                $.requestSender({
                                    url: __commons.processBasePath(_pagePath, '${viewProps.mapping}/remove'),
                                    type: 'POST',
                                    timeout: 0,
                                    data: {<#if multiPrimaryKey><#list primaryFields as p>
                                        ${p.name}: ${p.name},</#list><#else>
                                        ${primaryKey.name}: ids</#if>
                                    },
                                    success: function (data, textStatus, jqXHR) {
                                        if (data && data['ret'] === 0) {
                                            __notifyShow().success("删除操作成功！");<#if multiPrimaryKey>
                                            __pageWrapper.cards.queryCard.getFormWrapper().submit();<#else>
                                            // 方式一：移除表格中记录并更新总记录数
                                            var count = 0;
                                            $.each(ids, function (_, item) {
                                                if (tableWrapper.removeItem(item)) {
                                                    count++;
                                                }
                                            });
                                            if (paginator) {
                                                paginator.redrawRecordsTotal(paginator.getOptions().recordsTotal - count);
                                            }
                                            // 方式二：直接提交数据筛选表单重新查询
                                            // __pageWrapper.cards.queryCard.getFormWrapper().submit();</#if>
                                        } else {
                                            __commonsWarnMsgShow(data['msg']);
                                        }
                                    },
                                    error: __commonsAjaxError
                                });
                            }
                        })
                    } else {
                        __notifyShow().warn("请至少选择一条记录！");
                    }
                }</#if>

                <#if !(api.settings??) || api.settings.enableStatus!true><#if hasStatus!false>function _doStatus(tableWrapper, paginator, <#if multiPrimaryKey><#list primaryFields as p>${p.name}<#if p_has_next>, </#if></#list><#else>ids</#if>, status) {
                    if (<#if multiPrimaryKey><#list primaryFields as p>${p.name}<#if p_has_next> && </#if></#list><#else>ids && ids.length > 0</#if>) {
                        if (status) {
                            __confirmShow({
                                ok: function () {
                                    $.requestSender({
                                        url: __commons.processBasePath(_pagePath, '${viewProps.mapping}/' + status),
                                        type: 'POST',
                                        timeout: 0,
                                        data: {<#if multiPrimaryKey><#list primaryFields as p>
                                            ${p.name}: ${p.name},</#list><#else>
                                            ${primaryKey.name}: ids</#if>
                                        },
                                        success: function (data, textStatus, jqXHR) {
                                            if (data && data['ret'] === 0) {
                                                __notifyShow().success("状态更新操作成功！");
                                                __pageWrapper.refreshPage(__pageWrapper.cards.queryCard.getFormWrapper(), paginator.getCurrentPage());
                                            } else {
                                                __commonsWarnMsgShow(data['msg']);
                                            }
                                        },
                                        error: __commonsAjaxError
                                    });
                                }
                            });
                        }
                    } else {
                        __notifyShow().warn("请至少选择一条记录！");
                    }
                }</#if></#if>

                $.pageWrapper({
                    sidebar: {
                        items: __commons.sidebarItems(_pagePath),
                    },
                    navbar: {
                        navMenu: {
                            items: __commons.navMenuItems(_pagePath),
                        },
                        navAction: {
                            items: __commons.navActionItems(_pagePath),
                        }
                    },
                    cards: {
                        queryCard: {
                            form: {
                                enabled: true,
                                action: __commons.processBasePath(_pagePath, '${viewProps.mapping}/query'),
                                method: 'GET',
                                timeout: 0
                            }
                        },
                        resultCard: {
                            actions: {<#if !(api.settings??) || api.settings.enableCreate!true>
                                create: function () {
                                    __pageWrapper.modals.createModal.show();
                                },</#if><#if !multiPrimaryKey><#if !(api.settings??) || api.settings.enableStatus!true><#if hasStatus!false>
                                statusEnable: function () {
                                    _doStatus(this.getTableWrapper(), this.getPaginator(), this.getTableWrapper().selectedIds(), 'enable');
                                },
                                statusDisable: function () {
                                    _doStatus(this.getTableWrapper(), this.getPaginator(), this.getTableWrapper().selectedIds(), 'disable');
                                },</#if></#if><#if !(api.settings??) || api.settings.enableRemove!true>
                                delete: function () {
                                    _doDelete(this.getTableWrapper(), this.getPaginator(), this.getTableWrapper().selectedIds());
                                },</#if></#if><#if !(api.settings??) || api.settings.enableExport!true>
                                export: function () {
                                    __confirmShow({
                                        content: '确认要导出符合当前筛选条件的全部记录吗？',
                                        icon: 'fas fa-question-circle',
                                        type: 'orange',
                                        ok: function () {
                                            window.open(window.location.origin + '/${viewProps.mapping}/export?' + __pageWrapper.cards.queryCard.getFormWrapper().getForm().serialize());
                                        }
                                    });
                                }</#if>
                            },
                            table: {
                                checkbox: ${multiPrimaryKey?then('false', 'true')},
                                sorting: true,
                                actions: [<#if !(api.settings??) || api.settings.enableUpdate!true>
                                    {
                                        icon: 'far fa-edit',
                                        title: '编辑',
                                        callback: function (item) {
                                            __pageWrapper.modals.updateModal.getFormWrapper().setFormData(item);
                                            __pageWrapper.modals.updateModal.show();
                                        }
                                    },</#if>
                                    {
                                        icon: 'far fa-file-alt',
                                        title: '详情',
                                        callback: function (item) {
                                            __pageWrapper.modals.detailModal.setBodyContent($.buildStaticForm([
                                                <#list primaryFields as p>
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: item.${p.name} },
                                                </#list>
                                                <#list normalFields as p><#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat">
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: item.${p.name} ? moment(item.${p.name}).format('YYYY-MM-DD HH:mm:ss') : '' },
                                                <#elseif (p.type?ends_with('Integer') && p.column?starts_with('is'))>
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: _dict.logical[item.${p.name}] || item.${p.name} },
                                                <#elseif (p.type?ends_with('Integer') && p.column == 'type')>
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: _dict.type[item.${p.name}] || item.${p.name} },
                                                <#elseif (p.type?ends_with('Integer') && p.column == 'status')>
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: _dict.status[item.${p.name}] || item.${p.name} },
                                                <#else>
                                                { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', content: item.${p.name} },
                                                </#if></#list>
                                            ]));
                                            __pageWrapper.modals.detailModal.show();
                                        }
                                    },<#if !(api.settings??) || api.settings.enableStatus!true><#if hasStatus!false>
                                    {
                                        title: '启用',
                                        callback: function (item) {
                                            _doStatus(this, __pageWrapper.cards.resultCard.getPaginator(), <#if multiPrimaryKey><#list primaryFields as p>item.${p.name}<#if p_has_next>, </#if></#list><#else>[item.${primaryKey.name}]</#if>, 'enable');
                                        }
                                    },
                                    {
                                        title: '禁用',
                                        callback: function (item) {
                                            _doStatus(this, __pageWrapper.cards.resultCard.getPaginator(), <#if multiPrimaryKey><#list primaryFields as p>item.${p.name}<#if p_has_next>, </#if></#list><#else>[item.${primaryKey.name}]</#if>, 'disable');
                                        }
                                    },</#if></#if><#if !(api.settings??) || api.settings.enableRemove!true>
                                    {
                                        icon: 'far fa-trash-alt',
                                        title: '删除',
                                        callback: function (item) {
                                            _doDelete(this, __pageWrapper.cards.resultCard.getPaginator(), <#if multiPrimaryKey><#list primaryFields as p>item.${p.name}<#if p_has_next>, </#if></#list><#else>[item.${primaryKey.name}]</#if>);
                                        }
                                    }</#if>
                                ],
                                fields: [
                                    <#list primaryFields as p><#if !p.hideInList>
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text' },
                                    </#if></#list>
                                    <#list normalFields as p><#if !p.hideInList><#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat">
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text', itemTemplate: function(value) {
                                        return value ? moment(value).format('YYYY-MM-DD HH:mm:ss') : '';
                                    }},
                                    <#elseif (p.type?ends_with('Integer') && p.column?starts_with('is'))>
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text', itemTemplate: function(value) {
                                        return _dict.logical[value] || value;
                                    }},
                                    <#elseif (p.type?ends_with('Integer') && p.column == 'type')>
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text', itemTemplate: function(value) {
                                        return _dict.type[value] || value;
                                    }},
                                    <#elseif (p.type?ends_with('Integer') && p.column == 'status')>
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text', itemTemplate: function(value) {
                                        return _dict.status[value] || value;
                                    }},
                                    <#else>
                                    { title: '${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}', name: '${p.name}', type: 'text' },
                                    </#if></#if></#list>
                                ]
                            }
                        }
                    },
                    modals: {<#if !(api.settings??) || api.settings.enableCreate!true>
                        createModal: {
                            form: {
                                enabled: true,
                                action: __commons.processBasePath(_pagePath, '${viewProps.mapping}/create'),
                                method: 'POST',
                                timeout: 0,
                                validation: {
                                    enabled: true,
                                    rules: _validationRules,
                                },
                                beforeSubmit: function (formWrapper, requestOpts, data) {
                                },
                                afterSubmit: function (formWrapper, textStatus, data) {
                                },
                                onReset: function (formEl, formSubmitter) {
                                },
                                onSuccess: function (formWrapper, data, textStatus, jqXHR) {
                                    if (data && data['ret'] === 0) {
                                        __notifyShow().success("新增操作成功！");
                                        __pageWrapper.cards.queryCard.getFormWrapper().submit();
                                        __pageWrapper.modals.createModal.hide();
                                    } else {
                                        __commonsWarnMsgShow(data['msg']);
                                    }
                                }
                            },
                            onShow: function (event) {
                            },
                            onHide: function (event) {
                                __pageWrapper.modals.createModal.getFormWrapper().reset();
                            }
                        },</#if><#if !(api.settings??) || api.settings.enableUpdate!true>
                        updateModal: {
                            form: {
                                enabled: true,
                                action: __commons.processBasePath(_pagePath, '${viewProps.mapping}/update'),
                                method: 'POST',
                                timeout: 0,
                                validation: {
                                    enabled: true,
                                    rules: _validationRules,
                                },
                                beforeSubmit: function (formWrapper, requestOpts, data) {
                                },
                                afterSubmit: function (formWrapper, textStatus, data) {
                                },
                                onReset: function (formEl, formSubmitter) {
                                },
                                onSuccess: function (formWrapper, data, textStatus, jqXHR) {
                                    if (data && data['ret'] === 0) {
                                        __notifyShow().success("更新操作成功！");
                                        __pageWrapper.cards.queryCard.getFormWrapper().submit();
                                        __pageWrapper.modals.updateModal.hide();
                                    } else {
                                        __commonsWarnMsgShow(data['msg']);
                                    }
                                }
                            },
                            onShow: function (event) {
                            },
                            onHide: function (event) {
                                __pageWrapper.modals.updateModal.getFormWrapper().reset();
                            }
                        },</#if>
                        detailModal: {
                            onShow: function (event) {
                            },
                            onHide: function (event) {
                            }
                        }
                    }
                });
            });
        </script>
    </ymweb:property>
    <ymweb:layout>
        <adminlte:main-content _title="<#if api.description?? && (api.description?length > 0)>${api.description}<#else>${api.name}</#if>" _subtitle="" _showBackToTop="true">
            <jsp:attribute name="_breadcrumbPart">
                <adminlte:breadcrumb-item>首页</adminlte:breadcrumb-item>
                <adminlte:breadcrumb-item _active="true"><#if api.description?? && (api.description?length > 0)>${api.description}<#else>${api.name}</#if></adminlte:breadcrumb-item>
            </jsp:attribute>
            <jsp:body>
                <adminlte:card _id="queryCard"
                               _title="筛选条件"
                               _outline="true"
                               _useFormBody="true"
                               _showCollapseBtn="true"
                               _showFooterSubmitBtn="true"
                               _footerSubmitBtnText="查询"
                               _showFooterCancelBtn="true"
                               _footerCancelBtnText="重置">
                    <div class="messageShow" data-message-show="这里是默认提示信息。"></div>
                    <div class="row"><#list api.properties as p><#if p.config?? && p.config.query?? && p.config.query.enabled>
                            <div class="col-md-3 col-lg-2"><#if p.column?lower_case == "create_time" || p.column?lower_case == "createtime" || p.column?lower_case == "create_at" || p.column?lower_case == "createat" || p.column?lower_case == "last_modify_time" || p.column?lower_case == "lastmodifytime" || p.column?lower_case == "last_modify_at" || p.column?lower_case == "lastmodifyat"><adminlte:form-datetimepicker _name="${p.name}" _id="${p.name}Query" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="datetimepicker ${p.name}"/>
                            <#elseif (p.type?ends_with('Integer') && p.column?starts_with('is'))><adminlte:form-select _name="${p.name}" _id="${p.name}Query" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictLogical"/>
                            <#elseif (p.type?ends_with('Integer') && p.column == 'type')><adminlte:form-select _name="${p.name}" _id="${p.name}Query" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictType"/>
                            <#elseif (p.type?ends_with('Integer') && p.column == 'status')><adminlte:form-select _name="${p.name}" _id="${p.name}Query" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _class="dictStatus"/>
                            <#else><adminlte:form-input _name="${p.name}" _id="${p.name}Query" _label="${(p.description?? && p.description?trim?length > 0)?then(p.description, p.name)}" _helpText="" _type="text" _placeholder=""/></#if></div></#if></#list>
                    </div>
                </adminlte:card>
                <adminlte:card _id="resultCard"
                               _title="筛选结果"
                               _bodyClass="p-0"
                               _outline="true"
                               _showMaximizeBtn="true">
                    <jsp:attribute name="_tools"><#if !(api.settings??) || api.settings.enableCreate!true>
                        <button type="button" class="btn btn-tool" data-toggle="tooltip" title="新增" data-widget="card-action-btn" data-card-action="create"><i class="far fa-file"></i></button></#if><#if !multiPrimaryKey><#if !(api.settings??) || api.settings.enableStatus!true><#if hasStatus!false>
                        <button type="button" class="btn btn-tool" data-toggle="tooltip" title="启用" data-widget="card-action-btn" data-card-action="statusEnable"><i class="far fa-circle"></i></button>
                        <button type="button" class="btn btn-tool" data-toggle="tooltip" title="禁用" data-widget="card-action-btn" data-card-action="statusDisable"><i class="far fa-circle"></i></button></#if></#if><#if !(api.settings??) || api.settings.enableRemove!true>
                        <button type="button" class="btn btn-tool" data-toggle="tooltip" title="删除" data-widget="card-action-btn" data-card-action="delete"><i class="far fa-trash-alt"></i></button></#if></#if><#if !(api.settings??) || api.settings.enableExport!true>
                        <button type="button" class="btn btn-tool" data-toggle="tooltip" title="导出" data-widget="card-action-btn" data-card-action="export"><i class="far fa-share-square"></i></button></#if>
                    </jsp:attribute>
                    <jsp:attribute name="_footer">
                            <div class="row" data-widget="card-paginator">
                                <div class="paginationInfo col-md-6"></div>
                                <div class="col-md-6">
                                    <ul style="margin-bottom: 0; margin-top: 0;"></ul>
                                </div>
                            </div>
                        </jsp:attribute>
                    <jsp:body>
                        <div data-widget="card-table"></div>
                    </jsp:body>
                </adminlte:card><#if !(api.settings??) || api.settings.enableCreate!true>
                <adminlte:modal _id="createModal"
                                _title="新增"
                                _useFormBody="true"
                                _showCloseBtn="true"
                                _showFooterSubmitBtn="true"
                                _showFooterCancelBtn="true"
                                _footerSubmitBtnText="确认"
                                _footerCancelBtnText="重置"
                                _large="true"
                                _scrollable="true">
                    <div class="messageShow" data-message-show="这里是默认提示信息。"></div>
                    <#if multiPrimaryKey><#list primaryFields as p><@buildFormItem p false/></#list><#elseif primaryKey?? && primaryKey.config?? && primaryKey.config.createOrUpdate?? && primaryKey.config.createOrUpdate.enabled><@buildFormItem primaryKey false/></#if>
                    <#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled><@buildFormItem p false/></#if></#list>
                </adminlte:modal></#if><#if !(api.settings??) || api.settings.enableUpdate!true>
                <adminlte:modal _id="updateModal"
                                _title="修改"
                                _useFormBody="true"
                                _showCloseBtn="true"
                                _showFooterSubmitBtn="true"
                                _showFooterCancelBtn="true"
                                _footerSubmitBtnText="确认"
                                _footerCancelBtnText="重置"
                                _large="true"
                                _scrollable="true">
                    <div class="messageShow" data-message-show="这里是默认提示信息。"></div><#list primaryFields as p>
                    <input name="${p.name}" type="hidden"></#list><#if lastModifyTimeProp??>
                    <input name="${lastModifyTimeProp.name}" type="hidden"></#if>
                    <#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled><@buildFormItem p true/></#if></#list>
                </adminlte:modal></#if>
                <adminlte:modal _id="detailModal"
                                _title="详情"
                                _useFormBody="false"
                                _showCloseBtn="true"
                                _showFooterCancelBtn="true"
                                _footerCancelBtnText="关闭"
                                _large="true"
                                _scrollable="true">
                </adminlte:modal>
            </jsp:body>
        </adminlte:main-content>
    </ymweb:layout>
</ymweb:ui>